/*
 * @Description: 表格列配置
 * @Author: HuiSir<https://gitee.com/huisir001>
 * @Date: 2021-11-05 11:41:30
 * @LastEditTime: 2025-08-13 09:22:47
 */
import { defineTableCols } from "@/components/TablePage/predefined";
import { tableColsMixin } from "@/helpers/optionsMixin";

export default defineTableCols(() => [
  {
    label: "部门名称",
    minWidth: "200",
    prop: "name",
    fixed: "left",
  },
  {
    label: "状态",
    minWidth: "80",
    prop: "status",
    filters: [
      { text: "正常", value: 1 },
      { text: "停用", value: 0 },
    ],
    formatter(_row, _col, cellVal) {
      return cellVal == 1 ? "正常" : "停用";
    },
  },
  {
    label: "负责人",
    prop: "leader",
    minWidth: "100",
  },
  {
    label: "联系方式",
    prop: "phone",
    minWidth: "100",
  },
  ...tableColsMixin,
  {
    fixed: "right",
    minWidth: "200",
    useRowBtns: ["edit", "add", "del"],
    useFuzzySearch: true,
  },
]);
